fix incomplete removal of datetime_taken in PR #653#663
fix incomplete removal of datetime_taken in PR #653#663wpferguson merged 3 commits intodarktable-org:masterfrom
Conversation
|
I've checked it out locally and can confirm the rename op working again. Thank you! |
lib/dtutils/string.lua
Outdated
There was a problem hiding this comment.
This is wrong. emon_long gets "" and everything else gets nil
Should be
emon_long, emon_short, eyear, emon, eday, ehour, emin, esec, emsec = "", "", "", "", "", "", "", "", ""
There was a problem hiding this comment.
Yes, you are right. I swear I tested it, and fortunately, this did not cause a runtime error, because there is a check in lines 1083 to 1091.
But, of course, it is safer to initialize it properly.
fixed,
|
@deekayhd here's a test script, Start darktable, start the script, and assign a shortcut to it. In a collection hit the shortcut and it will build a substitution string on EXIF.MONTH.LONG for the first 10 images. The 11th will get an empty date time. What the script will do is set debug logging on it the string library and spit out a list of all the variable substitutions (which is how I found the nil instead of "" in the e... variables. |
|
Thanks for your thorough testing. With the script, I found that $(USERNAME) could come out as nil, as well, if not provided in the call of method substitute(). Fixed that, too. |
|
Looks good to me. Thanks |
Fixes a bug introduced with PR #653. Variable datetime_taken in string.lua, lines 788 and 792 is not used anymore and therefore not initialized correctly.
close #661.